package com.example.websockettest;

import com.example.websockettest.webSocket.WebSocketServer;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;

@SpringBootApplication
public class WebSocketTestApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(WebSocketTestApplication.class, args);
        WebSocketServer.setApplicationContext(run);
    }

    @Bean
    public ServerEndpointExporter serverEndpointExporter() {
        return new ServerEndpointExporter();
    }


}


